package com.labichaoka.chaoka.ui.baseinfo.person;

import android.content.Context;


import com.labichaoka.chaoka.entity.DistrictDataModel;
import com.labichaoka.chaoka.widget.wheel.adapters.AbstractWheelTextAdapter;

import java.util.List;

/**
 * Created by haosunTsao on 2016/10/26.
 */

public class DistrictListWheelAdapter extends AbstractWheelTextAdapter {

    private final List<DistrictDataModel> mDistrictDataList;
    private final Context mContext;

    public DistrictListWheelAdapter(Context cnt, List<DistrictDataModel> districtDataList){
        super(cnt);
        this.mContext = cnt;
        this.mDistrictDataList = districtDataList;
    }
    @Override
    public int getItemsCount() {
        return mDistrictDataList.size();
    }

    @Override
    protected CharSequence getItemText(int index) {
        return mDistrictDataList.get(index).getAddress();
    }
}
